package sunwin.yoms.comm;

/**
 * Created by mt on 2015/7/29.
 */
public class YomsPage {
    private int pageSize = 10;
    private int pageIndex = 1;
    private long pageCount = 1;

    public YomsPage() {
    }

    public YomsPage(int pageSize, int pageIndex) {
        this.pageSize = pageSize;
        this.pageIndex = pageIndex;
    }

    public YomsPage(int pageSize, int pageIndex, int pageCount) {
        this.pageSize = pageSize;
        this.pageIndex = pageIndex;
        this.pageCount = pageCount;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(int pageIndex) {
        if (pageIndex <= 0) {
            this.pageIndex = 1;
        } else {
            this.pageIndex = pageIndex;
        }
    }


    public long getPageCount() {
        return pageCount;
    }

    public void setPageCount(long pageCount) {
        if (pageCount <= 0) {
            this.pageCount = 1;
        } else {
            this.pageCount = pageCount;
        }
    }
}
